﻿@model IEnumerable<LinqToLdapExtensions.Domain.InetOrgPerson>

@{
    ViewBag.Title = "IntegrationTestUserList";
}

<h2>IntegrationTestUserList</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.DistinguishedName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FirstName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.LastName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DisplayName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.EMail)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PhoneNumber)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.DistinguishedName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FirstName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LastName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DisplayName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EMail)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PhoneNumber)
        </td>
        <td>
            @Html.ActionLink("Edit", "IntegrationTestUserEdit", new { id= Html.Raw(item.Uid.Replace('.','_')) }) |
            @Html.ActionLink("Details", "IntegrationTestUserDetails", new { id= (item.Uid.Replace('.','_')) }) |
            @Html.ActionLink("Delete", "IntegrationTestUserDelete", new { id=Html.Raw(item.Uid.Replace('.','_')) })
        </td>
    </tr>
}

</table>
